package com.source.barcodeMachineStatus.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.source.barcodeMachineStatus.entity.BarcodeMachineStatus;
import com.baomidou.mybatisplus.extension.service.IService;
import com.source.barcodeMachineStatus.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author fengq
 * @since 2021-02-27
 */
public interface BarcodeMachineStatusService extends IService<BarcodeMachineStatus> {
    /**
     * getStallsMessageVoById
     * @param barcodeMachineId
     * @return
     */
    List<StallsMessageVo> getStallsMessageVoById(String barcodeMachineId);

    /**
     * getOneBarcodeMachineStatusVo
     * @param id
     * @return
     */
    BarcodeMachineStatusVo getOneVo(String id);

    /**
     * getPageVo
     * @param page
     * @return IPage<BarcodeMachineStatusVo>
     */
    IPage<BarcodeMachineStatusVo> getPageVo(Page<BarcodeMachineStatusVo> page);

    /**
     * getAllUserNameAndId
     * @return
     */
    List<UserNameVo> getAllUserNameAndId();

    /**
     * getLikePageVo
     * @param page
     * @param keyword
     * @return
     */
    IPage<BarcodeMachineStatusVo> getLikePageVo(Page<BarcodeMachineStatusVo> page,@Param("keyword") String keyword);

    /**
     * findListByStatus
     * @param status
     * @return
     */
    List<BarcodeMachineStatus> findListByStatus(String status);

    /**
     * findStatusChart
     * @return
     */
    Map<String, Object> findStatusChart();

    /**
     * findStatusChart
     * @param houseId
     * @return
     */
    Map<String, Object> findStatusChart(String houseId);

    /**
     * selectCountBarcodeMachineByStatus
     * @param houseId
     * @return
     */
    List<BarcodeMachineStatusCountVo> selectCountBarcodeMachineByStatus(String houseId);

    /**
     * selectBarcodeMachineAddressByHouseId
     * @param houseId
     * @return
     */
    List<BarcodeMachineAddressVo> selectBarcodeMachineAddressByHouseId(@Param("houseId") String houseId,String state);

    /**
     * getBarcodeCountAndStallNameAndStatus
     * @param page
     * @param houseId
     * @param status
     * @return
     */
    IPage<BarcodeCountChart> getBarcodeCountAndStallNameAndStatus(Page<BarcodeCountChart> page,String houseId,String status);

    /**
     * 根据关键词查询脚标机的位置信息
     * @param houseId
     * @param keyword
     * @return
     */
    List<BarcodeMachineAddressVo> getBarcodeMachineAddressByHouseIdAndKeyword(String houseId,String keyword);

}
